import request from '@/utils/request'

export function getCarList(params) {
  return request(({
    url: '/car/list',
    method: 'get',
    params
  }))
}

export function getCarType() {
  return request(({
    url: '/car/getCarType',
    method: 'get'
  }))
}

export function getDrivers() {
  return request(({
    url: '/car/getDrivers',
    method: 'get'
  }))
}

export function deleteCar(param) {
  return request(({
    url: '/car/remove',
    method: 'post',
    data: param
  }))
}

export function addCar(params) {
  return request(({
    url: '/car/add',
    method: 'post',
    data: params
  }))
}

export function getCarById(param) {
  return request(({
    url: '/car/' + param,
    method: 'get'
  }))
}

export function editCar(params) {
  return request(({
    url: '/car/update',
    method: 'post',
    data: params
  }))
}
